FTEX Texture compressor and decompressor
========================================

Version 0.2, now with 23% less bugs!

There is now two programs:

cftex; which takes a bitmap and turns it into a .ftu and a .ftc file, and
dftex; which takes a .ftu or a .ftc file and turns it into a bitmap of your choice.

They are command line tools, so run it from a command prompt with -h to get some help.

cftex understands a fairly wide number of input formats, the .iff's that came with epic work. .ftu files use 24 bit RGB, so it's worth using a file format that come as 24 bit to start with. (the DXT1 compression in .ftc is 16 bit, and lossy).

Don't try using transparent textures - the Particle Systems FTEX docs seem to indicate that they are RGB only, I don't know how PS stored transparent textures and i'll need to investigate. DXT1 only supports a transparency mask (no alpha channel), and doing so limits you to 3 colours per 4 x 4 pixel block, so picture quality will suffer.

The different filter options supposedly produce higher quality output the
further down the list you go, it may be worth playing with them - the more
complicated ones will probably work better with "naturalistic" textures
(planets etc). The other may work better with ship textures etc.

You can see some comparative samples in the FreeImage manual, page 84 onwards:

http://prdownloads.sourceforge.net/freeimage/FreeImage380.pdf?download

As far as i can tell the .ftu file generation is fine. It's possible that the output images are back to front and upside down, if you can verify that they are (or arn't) tell me and i'll fix it.

The DXT1 texture compression is done with the ATI_Compress lib:

http://www.ati.com/developer/compress.html

There is an Nvidia lib that does the same kind of thing, but I couldn't get it to work with the development tools I've got.

The compress.sh file is just a /bin/sh script to batch compress textures in the current directory, useful if you use cygwin.

I used Code::Blocks ( http://www.codeblocks.org/ ) with the MSVC compiler.

ChangeLog
=========

0.2 renamed genftex to cftex.
    added dftex.
    added .ftu support to dftex.
    added -q (quiet) command line option.
    added -m (also dump mipmaps) to dftex - it defaults to just converting
        the biggest mipmap.
    check that input images to cftex are powers of 2, not just divisible
        by 2.
    check that FreeImage can save the image type you ask for in dftex.
    check that the version of the FreeImage dll that we've got is the same
        as the one we where compiled with.
    
0.1 initial release

Contacts
========

email: jasper@pointless.net
msn: jasper.wallace@hotmail.co.uk
AIM: "Jasper Wallace"

CREDITS
=======

The getopt implementation is by Benjamin Sittler.
ATI for ATI_Compress: http://www.ati.com/developer/compress.html
The FreeImage Project for FreeImage http://freeimage.sourceforge.net/index.html
